<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="icon" href="favicon.ico" type="image/x-icon"/>
<title>添加门店-门店管理-{$site.BACK_NAME}</title>
<include file="Public:jscss"/>
</head>
<body>
<div class="wrap">
 <include file="Public:head"/>
 <div class="mainBody">
  <include file="Public:left"/>
  <div id="Right">
   <div class="Item hr">
    <div class="current">添加门店</div>
   </div>
   <form action="" method="post">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table1">
     <tr>
      <th width="100">门店名称：</th>
      <td><input id="name" type="text" class="input" size="60" name="name" value=""/></td>
     </tr>
	 <tr>
      <th width="100">标示：</th>
      <td>
	   <input id="ident" type="text" class="input" size="20" name="ident" value=""/>
	   <span style="color:#999; font-size:12px; margin-left:10px;">必须填写，只能支持字母和下划线</span>
	  </td>
     </tr>
	 <tr>
      <th width="100">门店地址：</th>
      <td><input id="address" type="text" class="input" size="80" name="address" value=""/></td>
     </tr>
	 <tr>
      <th width="100">所属客户名称：</th>
      <td><input id="scustomer" type="text" class="input" size="80" name="scustomer" value=""/></td>
     </tr>
	 <tr>
      <th width="100">店面类型：</th>
      <td>
	   <input id="stype" type="text" class="input" size="20" name="stype" value=""/>
	   <span style="color:#999; font-size:12px; margin-left:10px;">下拉选项</span>
	  </td>
     </tr>
	 <tr>
      <th width="100">区域经理MS：</th>
      <td>
	   <select name="dms_id" id="dms_id" style="min-width: 80px;">
	    <option value="0">不指定</option>
	    <foreach name="ms_op" item="ms">
		<option value="{$ms.user_id}" {:is_disabled($ms['status'] == 1, false)}>{$ms.realname}</option>
		</foreach>
	   </select>
	  </td>
     </tr>
	 <tr>
      <th width="100">城市经理CM：</th>
      <td>
	   <select name="dcm_id" id="dcm_id" style="min-width: 80px;">
	    <option value="0">不指定</option>
		<foreach name="cm_op" item="cm">
		<option value="{$cm.user_id}" {:is_disabled($cm['status'] == 1, false)}>{$cm.realname}</option>
		</foreach>
	   </select>
	  </td>
     </tr>
	 <tr>
      <th width="100">客户老板：</th>
      <td>
	   <select name="cboss_id" id="cboss_id" style="min-width: 80px;">
	    <option value="0">不指定</option>
		<foreach name="bs_op" item="bs">
		<option value="{$bs.user_id}" {:is_disabled($bs['status'] == 1, false)}>{$bs.realname}</option>
		</foreach>
	   </select>
	  </td>
     </tr>
	 <tr>
      <th width="100">门店CMO：</th>
      <td>
	   <select name="ccmo_id" id="ccmo_id" style="min-width: 80px;">
	    <option value="0">不指定</option>
		<foreach name="cmo_op" item="cmo">
		<option value="{$cmo.user_id}" {:is_disabled($cmo['status'] == 1, false)}>{$cmo.realname}</option>
		</foreach>
	   </select>
	  </td>
     </tr>
	 <tr>
      <th width="100">门店店长：</th>
      <td>
	   <select name="cshopkeeper_id" id="cshopkeeper_id" style="min-width: 80px;">
	    <option value="0">不指定</option>
		<foreach name="csk_op" item="csk">
		<option value="{$csk.user_id}" {:is_disabled($csk['status'] == 1, false)}>{$csk.realname}</option>
		</foreach>
	   </select>
	  </td>
     </tr>
     <tr>
      <th width="100">开启状态：</th>
      <td>
	   <label><input type="radio" name="status" value="0" /> 禁用</label> &nbsp; 
	   <label><input type="radio" name="status" value="1" checked="checked" /> 启用</label> 
	  </td>
     </tr>
     <tr>
      <th>排序：</th>
      <td>
	   <input type="text" class="input" size="4" name="sort" id="sort" value="0"/>
	   <span style="color:#999; font-size:12px; margin-left:10px;">请填写整数，值越小越靠前。</span>
	  </td>
     </tr>
	 <tr>
      <th>备注：</th>
      <td><textarea name="remark" rows="5" cols="57"></textarea></td>
     </tr>							
    </table>
   </form>
   <div class="commonBtnArea" >
    <button class="btn cfz_submit">提交</button>
   </div>
  </div>
 </div>
</div>
<div class="clear"></div>
<include file="Public:foot"/>        
</body>
<script type="text/javascript">
$(function(){
	//提交表单
	$(".cfz_submit").click(function(){
		if($("#name").val()==''){
			$.jBox.tip('门店名称不能为空', 'info');
			return false;
		}
		if($("#ident").val()==''){
			$.jBox.tip('唯一标识不能为空', 'info');
			return false;
		}
		if(!isSafeStr($("#ident").val())){
			$.jBox.tip('唯一标识只能由数字字母和下划线组成', 'info');
			return false;
		}
		if(!isSafeInt($("#sort").val())){
			$.jBox.tip('排序必须是数字', 'info');
			return false;
		}
		commonAjaxSubmit();
		return false;
	});
});
</script>
</html>